resource "azurerm_kubernetes_cluster" "aks" {
  name                = "k8sCluster"
  location            = var.location
  resource_group_name = var.resource_group_name
  dns_prefix          = "k8sCluster"

  default_node_pool {
    name       = "default"
    vm_size    = "Standard_D2_v2"
    min_count              = 1
    max_count              = 2
    max_pods               = 30
    type                   = "VirtualMachineScaleSets"
    enable_auto_scaling    = true
  }

  identity {
    type = "SystemAssigned"
  }
  
}